﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zhaoxi.MvvmLesson.Base;

namespace Zhaoxi.MvvmLesson.ViewModels
{
    internal class MainViewModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler? PropertyChanged;

        private int _value;

        public int Value
        {
            get { return _value; }
            set
            {
                _value = value;
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Value"));
            }
        }


        public Command ButtonCommand { get; set; }

        public MainViewModel()
        {
            ButtonCommand = new Command(DoButtonCommand);
        }
        private void DoButtonCommand(object? obj)
        {
            // 
        }


        // 代码片段
        


    }
}
